package com.huawei.java.main.inputentity;

public class VmType {
    private String VMType;//型号
    private int CPU;
    private int memory;
    private int nodeType;//单双节点部署，0表示单节点，1表示双节点
    private double cpuAndMemRatio;//核内比

    public VmType(String VMType, int CPU, int memory, int node) {
        this.VMType = VMType;
        this.CPU = CPU;
        this.memory = memory;
        this.nodeType = node;
        this.cpuAndMemRatio=(double) CPU/memory;
    }

    /**
     * 型号名称
     * @return
     */
    public String getVMType() {
        return VMType;
    }

    public void setVMType(String VMType) {
        this.VMType = VMType;
    }

    public int getCPU() {
        return CPU;
    }

    public void setCPU(int CPU) {
        this.CPU = CPU;
    }

    public int getMemory() {
        return memory;
    }

    public void setMemory(int memory) {
        this.memory = memory;
    }

    /**
     * 单节点或双节点部署，0表示单节点，1表示双节点
     * @return
     */
    public int getNodeType() {
        return nodeType;
    }

    public void setNodeType(int nodeType) {
        this.nodeType = nodeType;
    }

    @Override
    public String toString() {
        return "VisualMachine{" +
                "VMType='" + VMType + '\'' +
                ", CPU=" + CPU +
                ", memory=" + memory +
                ", nodeType=" + nodeType +
                ", cpuAndMemRatio=" + cpuAndMemRatio +
                "}\n";
    }

    /**
     * 核内比
     * @return
     */
    public double getCpuAndMemRatio() {
        return cpuAndMemRatio;
    }

    public void setCpuAndMemRatio(double cpuAndMemRatio) {
        this.cpuAndMemRatio = cpuAndMemRatio;
    }
}
